// https://www.luogu.com.cn/problem/P5739

#include <stdio.h>

int main() {
    int n;
    scanf("%d", &n);
    long ans = 1;
    for (int i=2; i<=n; i++) {
        ans *= i;
    }
    printf("%ld\n", ans);
    return 0;
}